/*****************************************************************************
 *
 * Copyright (c), 2004-2020,ShangHai Neotune Information Technology Co., Ltd.
 *
 * Module Name : snmpstat.h
 *
 * Author :    sean
 *
 * Date :    2004-02-05
 *
 * Version :    1.00
 *
 * Description :    
 *
 * Other :    
 *
 * Data Structure List: <Main Data Structure>
 *
 * Modification History
 * ---------------------------------------------------------------------------
 *  1: Data :      2004-02-05
 *    Author :     sean
 *    Version :    V100R001M00
 *    Modification : creation
 *
*****************************************************************************/

#if (!defined(snmpstat_inc))
#define snmpstat_inc

#ifdef __cplusplus
extern"C" {
#endif

#if (!defined(asn1conf_inc))
#include <asn1conf.h>
#endif

#if (!defined(snmpdefs_inc))
#include <snmpdefs.h>
#endif

#if (!defined(snmp_inc))
#include <snmp.h>
#endif

#if (ENVOY_NEED_STATS)

#ifdef NEOSNET_STRUCT_ALIGN
#pragma align 1
#endif

typedef struct  SNMP_STATS_S
        {
        unsigned long   snmpInPkts;
        unsigned long   snmpInBadVersions;
        unsigned long   snmpInBadCommunityNames;
        unsigned long   snmpInBadCommunityUses;
        unsigned long   snmpInASNParseErrs;
        unsigned short  snmpEnableAuthTraps;
#if INSTALL_ENVOY_SNMP_GROUP_V1
        unsigned long   snmpOutPkts;
        unsigned long   snmpInBadTypes;
        unsigned long   snmpInTooBigs;
        unsigned long   snmpInNoSuchNames;
        unsigned long   snmpInBadValues;
        unsigned long   snmpInReadOnlys;
        unsigned long   snmpInGenErrs;
        unsigned long   snmpInTotalReqVars;
        unsigned long   snmpInTotalSetVars;
        unsigned long   snmpInGetRequests;
        unsigned long   snmpInGetNexts;
        unsigned long   snmpInSetRequests;
        unsigned long   snmpInGetResponses;
        unsigned long   snmpInTraps;
        unsigned long   snmpOutTooBigs;
        unsigned long   snmpOutNoSuchNames;
        unsigned long   snmpOutBadValues;
        unsigned long   snmpOutReadOnlys;
        unsigned long   snmpOutGenErrs;
        unsigned long   snmpOutGetRequests;
        unsigned long   snmpOutGetNexts;
        unsigned long   snmpOutSetRequests;
        unsigned long   snmpOutGetResponses;
        unsigned long   snmpOutTraps;
#endif /* INSTALL_ENVOY_SNMP_GROUP_V1 */
#if INSTALL_ENVOY_SNMP_GROUP_V2
        unsigned long   snmpSilentDrops;
        unsigned long   snmpProxyDrops;
#endif /* INSTALL_ENVOY_SNMP_GROUP_V2 */
#if INSTALL_ENVOY_SNMP_VERSION_3
        unsigned long   snmpUnknownSecurityModels;
        unsigned long   snmpInvalidMsgs;
        unsigned long   snmpUnknownPDUHandlers;
        unsigned long   snmpUnavailableContexts;
        unsigned long   snmpUnknownContexts;
        unsigned long   usmStatsUnsupportedSecLevels;
        unsigned long   usmStatsNotInTimeWindows;
        unsigned long   usmStatsUnknownUserNames;
        unsigned long   usmStatsUnknownEngineIDs;
        unsigned long   usmStatsWrongDigests;
        unsigned long   usmStatsDecryptionErrors;
#endif /* INSTALL_ENVOY_SNMP_VERSION_3 */
        } SNMP_STATS_T;

#ifdef NEOSNET_STRUCT_ALIGN
#pragma align 0
#endif


extern  SNMP_STATS_T    snmp_stats;

#endif  /* ENVOY_NEED_STATS */


/* Some macros to make the mainline code a little cleaner to read */
#if (INSTALL_ENVOY_SNMP_GROUP_V1)
#define SGRPv1_INC_COUNTER(x) inc_counter(x)
#define SGRPv1_ADD_COUNTER(x, y) add_counter(x, y)
#else
#define SGRPv1_INC_COUNTER(x)
#define SGRPv1_ADD_COUNTER(x, y)
#endif

#if (INSTALL_ENVOY_SNMP_GROUP_V2)
#define SGRPv2_INC_COUNTER(x) inc_counter(x)
#else
#define SGRPv2_INC_COUNTER(x)
#endif

#if (INSTALL_ENVOY_SNMP_GROUP_V1 || INSTALL_ENVOY_SNMP_GROUP_V2)
#define SGRPv1v2_INC_COUNTER(x) inc_counter(x)
#else
#define SGRPv1v2_INC_COUNTER(x)
#endif

#if (INSTALL_ENVOY_SNMP_VERSION_3)
#define SGRPv3_INC_COUNTER(x) inc_counter(x)
#else
#define SGRPv3_INC_COUNTER(x)
#endif

#ifdef __cplusplus
}
#endif

#endif /* snmpstat_inc */

